<template>
    <el-tabs v-model="activeName" size="small">
        <el-tab-pane v-for="item in tabPaneList" :key="item.name" :label="item.title" :name="item.name">
            <list v-if="activeName === item.name" :key="item.name" :active-name="activeName" :name="item.name"></list>
        </el-tab-pane>
    </el-tabs>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import list from './components/List.vue';

const activeName = ref('innerPoint');
const tabPaneList = ref([
    {
        title: '梯内屏',
        name: 'innerPoint',
    },
    {
        title: '梯内框',
        name: 'innerBox',
    },
    {
        title: '梯外屏',
        name: 'outPoint',
    },
    {
        title: '梯外框',
        name: 'outBox',
    },
    {
        title: '门禁',
        name: 'gateway',
    },
    {
        title: '道闸',
        name: 'barrier',
    },
]);
// const setPointList = (el: any) => {
//     console.log('setPointList1');
//     if (el) {
//         refList.value.length >= 6 ? '' : refList.value.push(el);
//     }
// };
// const handleClick = (tab: TabsPaneContext, event: Event) => {
//     console.log(tab, event);
// };
</script>
